package com.xin;

import java.util.HashSet;
import java.util.Set;

public class Solution1 {
    public int findRepeatNumber(int[] nums) {
        int result = -1;
        Set<Integer> set = new HashSet<>();
        for (int i : nums) {
            if(!set.add(i)) {
                result = i;
                break;
            }
        }
        System.out.println(re);
        return result;

    }

    public static void main(String[] args) {
        new Solution1().findRepeatNumber(new int[]{1, 2, 3, 2});
    }
}
